import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class day230407 {
    // 计算某字符出现次数
    public static void main4(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String find = br.readLine();
        int count = 0;

        for (char c : str.toCharArray()) {
            // 遍历字符串
            if (find.equalsIgnoreCase(String.valueOf(c))) {
                // 忽略大小写, 比较是否相等
                count++;
            }
        }
        System.out.println(count);
    }
    public static void main3(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = new String(br.readLine().toLowerCase());
        String ch = br.readLine().toLowerCase();
        int count = 0;
        for (int i = 0; i < str.length(); i++) {
            if (ch.charAt(0) == str.charAt(i)) {
                count++;
            }
        }
        System.out.println(count);
    }

    // 杨辉三角的变形
    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if (n == 1 || n == 2) {
            System.out.println(-1);
        } else {
            if (n % 4 == 3 || n % 4 == 1) {
                System.out.println(2);
            } else if (n % 4 == 0) {
                System.out.println(3);
            } else if (n % 4 == 2){
                System.out.println(4);
            }
        }
    }


    // 内存溢出 OutOfMemoryError
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] array = new int[n][2*n - 1];
        if (n == 1 || n == 2) {
            System.out.println(-1);
            return;
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < 2 * (i + 1) - 1; j++) {
                if (j == 0) {
                    array[i][j] = 1;
                } else if (j == 1) {
                    array[i][j] = array[i - 1][j - 1] + array[i - 1][j];
                } else {
                    array[i][j] = array[i - 1][j - 2]
                            + array[i - 1][j - 1] + array[i - 1][j];
                }
            }
        }

        for (int j = 0; j < 2 * n - 1; j++) {
            if (array[n - 1][j] % 2 == 0) {
                System.out.println(j + 1);
                break;
            }
        }
    }
}
